This invention relates to a distance measuring apparatus capable of measuring a distance to a target object, for example a human body, and also measuring its shape.
Conventionally, there has been a distance measuring apparatus available such that it gets a range image by an active method i.e. by using projected light and measures a distance to a target. FIG. 18 shows a block diagram of such a conventional distance measuring apparatus Axe2x80x2. This conventional apparatus has a clock signal generator unit 1 which generates a clock signal CK to synchronize light irradiation and reception, a modulated light projector unit 2 which projects light Pt modulated in brightness and a predetermined frequency and synchronized with the signal CK, a light receiver unit 3 which receives reflected light from a target object TG such as a human body and transforms the received light to received-light-signal and outputs the signal to a demodulator unit 4xe2x80x2 which will be used to form an image including information (namely a range image) showing distances of objects including the target object TG.
The demodulator unit 4xe2x80x2 demodulates the received-light-signal which is synchronous with the clock signal CK, that is, the signal corresponding to modulated reflected-light Ptxe2x80x2. The light Ptxe2x80x2 originates in the modulated light Pt, and is also return-light from the target object TG and other objects after projection and reflection.
The light receiver unit 3 has a light receiving device of two dimension in which many image elements are arrayed in matrix. The unit 3 reads out signal charges corresponding to a received quantity of light from each image element, and gets received-light-signals by processing the signal charges.
The demodulator unit 4xe2x80x2 comprises a microcomputer and memories, and executes above-mentioned demodulation process with a pre-installed program so as to extract signals corresponding to the reflected-light Ptxe2x80x2 from the above-mentioned received-light-signal which is output by the unit 3.
Through the demodulation process, the unit 4xe2x80x2 obtains the distance information to the objects in a form of signal level using the extracted signals based on the time differences, in other words, phase differences between the light Pt and the reflected-light Ptxe2x80x2, and forms the range image in which above-mentioned distances to the objects are expressed by using the signal levels. Hence a distance to the target object TG and its shape (two dimensional shape) are measurable by using this range image obtained in the demodulator unit 4xe2x80x2. The range image is output to a display unit B to be displayed there.
Such a conventional apparatus Axe2x80x2 is configured, for example, by using optical system of lenses so that reflected-light from objects is fed onto the light receiving device in the light receiver unit 3, and is used as a monitoring apparatus to monitor an invader, a target object TG, entering into the monitored area.
FIG. 19 shows signal levels along one horizontal line of a range image obtained by the demodulator unit 4xe2x80x2. The signal level is defined in the manner that the near the object is, the higher the signal level is. This figure shows a situation that a target object TG having a spherical shape is at the forward center of the light receiving device.
In general natural light and/or reflected disturbing light Pn are received along with the reflected-light of modulated light Pt by the light receiver unit 3 as shown in FIG. 18. Those components equivalent to the modulated light Pt results in noises which is superimposed on the range image. For example, as shown in FIG. 19, there can be seen noise components in the both sides of a half circle. The half circle is a shape image of the target object TG. The signal levels are largely changing in a small span because of noise.
As another case, if the quantity of light coming into the light receiver unit 3 is too small, the output signal level of the light receiving devise becomes so low that noise components are superimposed on the range image. Noises may be superimposed also on the waveform of the target object TG, and these are omitted in FIG. 19.
Such noise components tends to increase when large fluctuation of the received quantity of light occurs. Followings are those cases that the quantity of light received by the light receiver unit 3 is small, the objects have various reflection coefficients, or near and far objects are mixed in the scene.
The range image on which noises are superimposed is uneasy to see when displayed by the display unit B. Besides the noises in the range image tends to obstruct many kind of data processing in the successive stages.
In view of the above, it is an object of the invention to provide a distance measuring apparatus that can remove the noise components in a range image.
According to an aspect of the present invention, an apparatus for measuring a distance to a target object and a shape of the target object with a range image which is obtained beforehand and contains information of distances to objects including the target object comprises following two means.
One is a range image obtaining means which obtains the range image by irradiating light onto the objects and receiving reflected light from the objects by a light receiving device. The range image presents signal levels which changes according to the distances to the objects,
Another one is a range image processing means which divides the obtained range image into a number of unit-range-images so as to discard every unit-range-image as noise if variation of a signal level in the unit-range-image exceeds a pre-determined threshold, and to save every unit-range-image as usable range image if variation of signal levels in the unit-range-image dose not exceed the threshold.
Consequently, prevailing noise components in the range image can be removed by discarding the unit-range-images as noise in which the variation of the signal levels exceeds predetermined threshold. As the results, almost all noises are removed from the range image which is composed of unit-range-images such that the variation of the signal levels in them dose not exceeds predetermined threshold.
Thus, there is a technical advantage in this apparatus since it can be performed precisely without influence of noises to measure the distance to the target object and the shape of the target object.
According to a further aspect of the present invention, the range image processing means interpolates the discarded unit-range-images by using unit-range-images in which variation of signal levels does not exceed the threshold and which are next to the discarded unit-range-images, or by using an average value calculated from a plurality of unit-range-images in which variation of signal level does not exceed the threshold.
Consequently, a further technical advantage is achieved by the interpolation, that is, background information around the target object can be available, in other words, it is impossible to use background information if the discarded unit-range-images are left discarded without interpolation.
According to a further aspect of the present invention, the range image processing means defines a central-range-image locating in the middle of serial unit-range-images in which variation of signal levels does not exceed the threshold, and selects unit-range-images which has signal levels fall between a representative signal level of the central-range-image and a signal level calculated by adding a predetermined value to the representative signal level or by subtracting a predetermined value from the representative signal level.
Consequently, a further technical advantage is achieved that processing time can be reduced when the shape of the target object is substantially included in the above-mentioned selected unit-range-images and if it is enough to detect partially the target object.
According to a further aspect of the present invention, the range image processing means differentiates every unit-range-image in the range image such that unit-range-images regarded as noise are already discarded from it, so that a background image displaying other than the target object is removed.
Consequently, a further technical advantage is achieved that boundaries between the target object and its background can be made clear.
An apparatus for measuring a distance to a target object and a shape of the target object with a range image which is obtained beforehand and contains information of distances to objects including the target object comprises following means.
A range image obtaining means obtains the range image by irradiating light onto the objects and receiving reflected light from the objects by a light receiving device. The range image presents signal levels which changes according to the distances to the objects. And the means defines a plurality of base-regions composed of predetermined number of serial picture elements in the light receiving device.
And the means performs one or two of following two processes;
(1) process for executing a range image obtaining process except for every base-region in which the received quantity of light is less than a predetermined level criterion, and
(2) process for executing a range image obtaining process except for every plurality of serial base-regions in which an average value of the received quantity of light is less than a predetermined level criterion.
Consequently, processing time is reduced since it can be skipped to execute a range obtaining process for the base-region in which received quantity of light is insufficient based on the comparison of the received quantity of light or the average value of the received quantity of light with each criterion.
According to a further aspect of the present invention, the range image obtaining means does not execute a range image obtaining process for the base-regions when variation of the received quantity of light between neighboring base-regions exceeds a predetermined value even though the received quantity of light or the average value of received quantity of light is not less than the predetermined level criterion in the base-region.
Consequently, distance measuring performance and reliability increase since base-regions such that variation of received quantity of light in them is so large between neighboring base-regions that the variation exceeds a predetermined value are removed, and therefore serial picture elements can be removed collectively from the process objects of the range image obtaining process.
In detail, even if the received quantity of light is sufficient, its large variation deteriorates the reliability of distance measurement, and the deterioration is suppressed by above-mentioned removal.
According to a further aspect of the present invention, the range image processing means regards a region of the range image described bellow as noise and assigns a uniform signal level to the region. The above-mentioned region is the region corresponding to the base-regions in which variation of the received quantity of light exceeds a predetermined threshold, or the region in which the variation of signal levels exceeds a predetermined threshold.
Consequently, measurement of the distance to the target object or the shape can be performed precisely without influence of noises since there are few noises in the region where a uniform signal level is not assigned as the result of above-mentioned noise removal from the view point of the variation evaluation.
According to a still further aspect of the present invention, the range image processing means recognizes a following region of the range image to be distance information which is showing a shape of the target object, while as to noise region the means assigns three kind of levels to the noise region according to the shape of the target object. The above-mentioned region is the region corresponding to the base-region in which variation of the received quantity of light does not exceeds a predetermined threshold, or the region having such signal levels that any variation of them does not exceeds a predetermined threshold.
And above-mentioned three kind of levels assigned to the noise region are as follows. In comparison with periphery of the target object, if the middle of the object has; first, a convex shape toward near side, a signal level of far enough position from the target object is assigned to the noise region; second, a concave shape from near side view, a signal level of near enough position from the target object is assigned to the noise region; and third, both convex and concave shapes toward near side, a signal level of mid position between convex and concave parts of the target object is assigned to the noise region.
Consequently, the shape of the target object is made clear since noise region are leveled.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.